package com.tb.mapper;

import com.tb.pojo.Order;
import com.tb.pojo.OrderExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderMapper {

    //根据订单id查询用户订单详情-宁
    Order getOrderByOid(Map<String, Object> map);

    //根据状态查询用户订单-宁
    List<Order> getOrderByStatusId(Map<String, Object> map);

    //查询用户所有订单-宁
    List<Order> getAllOrder(Map<String, Object> map);
    List<Order> selectAllUser();

    long countByExample(OrderExample example);
    //根据用户id待付款数量
    int countDFKByStatus4(String userId);
    //待收货数量
    int countDFKByStatus2(String userId);
    //待评价数量
    int countDPJByStatus6(String userId);

    int deleteByExample(OrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    List<Order> selectByExample(OrderExample example);

    Order selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByExample(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    int updateOrderStatus(Order order);

    int insertOrders(Order order);

    int retrunId();

    int updateAddress(Order order);
}